home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_jep_intro.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  130 lines

  1. # Jones 3D Cog Script
  2. #
  3. # jep_Intro.cog
  4. #
  5. # [DS & revised by HB]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ==============================================================================
  10.  
  11. symbols
  12.  
  13.     message     startup
  14.     message     user0
  15.     
  16.     keyframe    in_hatpush=0in_figithat_4_4.key        local
  17.     # keyframe    in_think=0in_thinking_4_4.key        local
  18.     keyframe    in_sideTOhips=0in_stand1_bd_4.key    local
  19.     keyframe    in_handsONhips=0in_stand4.key        local
  20.     keyframe    in_botharmsup=0in_armsup_1_1.key    local
  21.  
  22.     sound        in_names=jp01j01a.wav                local # Sophia? Turner? 2.5s
  23.     sound        in_where=jp01j02.wav                local # Where is everybody? 2.7s
  24.     sound        music0=mus_jep_intro.wav            local
  25.  
  26.     thing        player                                local
  27.     thing        indyactor                            nolink
  28.     thing        campos_lo                            nolink
  29.     thing        campos_hi                            nolink
  30.     thing        camtarg                                nolink
  31.     thing        fader                                # gen_fadeplat thing
  32.  
  33.     material    topMat=jeep_top.mat                    local
  34.     material    botMat=jeep_bbmp.mat                local
  35.  
  36.     int         in_keytrack1                        local
  37.     int            in_keytrack2                        local
  38.     int         cursound                            local
  39.  
  40.     int            bSeen=0                                local
  41.  
  42. end
  43.  
  44. # ==============================================================================
  45.  
  46. code
  47.  
  48. startup:
  49.  
  50.     SetMasterCog(GetSelfCog()); # RT: Set master cog so we get autosave/restore message
  51.  
  52.     Sleep(0.001); # Let engine get set up
  53.  
  54.     # Start on black...
  55.     SetCameraLookInterp(2, 0);
  56.     SetCameraPosInterp(2, 0);
  57.     SetCameraFocus(2, campos_lo);
  58.     SetCameraSecondaryFocus(2, camtarg);
  59.     SetCurrentCamera(2);
  60.  
  61.     return;
  62.  
  63. # ..............................................................................
  64.  
  65. user0: # RT: Indicates that autosave/restore has completed...
  66.  
  67.     if (bSeen) return; # RT
  68.     bSeen = 1;
  69.  
  70. #   switch camera first
  71.     SetCameraLookInterp(2, 0);
  72.     SetCameraPosInterp(2, 0);
  73.     SetCameraFocus(2, campos_lo);
  74.     SetCameraSecondaryFocus(2, camtarg);
  75.     SetCurrentCamera(2);
  76.  
  77.     # RT: Set up jeep materials
  78.     SetMaterialCel(topMat, 2);
  79.     SetMaterialCel(botMat, 2);
  80.  
  81. #   let engine generate frame
  82.     Sleep(0.01);
  83.  
  84. #    now start level
  85.  
  86.     player = GetLocalPlayerThing();
  87.     AttachThingToThing(camtarg, indyactor);
  88.     SetActorFlags(player, 0x200000);
  89.     StartCutscene(2);
  90.     SetThingFlags(player, 0x80000);
  91.     ClearThingFlags(indyactor, 0x80000);
  92.     CopyPlayerHolsters(player, indyactor);
  93.     PlaySoundLocal(music0, 1.0, 0.0, 0x0, 0);
  94.  
  95.     ThingFadeAnim(fader, 1.0, 0.0, 1.5, 0);    
  96.     AISetMoveSpeed(indyactor, 1.0);
  97.     AISetMoveThing(indyactor, player, 0);
  98.     SetCameraPosInterp(2, 1);
  99.     SetCAmeraInterpSpeed(2, 4.5);
  100.     Sleep(0.01);
  101.     SetCameraFocus(2, campos_hi);
  102.     AIWaitForStop(indyactor);
  103.     cursound=PlayVoice(indyactor, in_names, 1.0, 0);
  104.     Sleep(1.0);
  105.     in_keyTrack1 = PlayKey(indyactor, in_handsONhips, 2, 0x0, 0);
  106.     PlayKey(indyactor, in_sideTOhips, 4, 0x12, 1);
  107.     in_keyTrack2 = PlayKey(indyactor, in_hatpush, 4, 0x12, 0);
  108.     Sleep(1.5);
  109.     StopKey(indyactor, in_keyTrack1, 0.5);
  110.     StopKey(indyactor, in_keyTrack2, 0.5);
  111.     Sleep(0.5);
  112.     WaitForSound(cursound);
  113.     PlayVoice(indyactor, in_where, 1.0, 0);
  114.     PlayKey(indyactor, in_botharmsup, 4, 0x12, 1);
  115.     ResetCameraFOV(0, 0.0);
  116.     SetCameraLookInterp(2, 0);
  117.     SetCameraPosInterp(2, 0);
  118.     SetThingFlags(indyactor, 0x80000);
  119.     ClearThingFlags(player, 0x80000);
  120.     SetThingAlpha(player, 1.0);
  121.     SetCameraPosition(1, GetThingPos(campos_hi));
  122.     SetCurrentCamera(1);
  123.     EndCutscene();
  124.     ClearActorFlags(player, 0x200000);
  125.  
  126.     return;
  127.  
  128. end
  129.  
  130.